package com.ff.xyh.feign.client.post;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ff.xyh.common.entity.post.PostImg;
import com.ff.xyh.common.entity.result.ResultMessage;
import com.ff.xyh.common.entity.result.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Auther FF
 * @Date 2022年 11月 15日
 * @Time 23:41
 */
@FeignClient(value = "service-post", contextId = "PostImgClient")
@RequestMapping("/post-service")
public interface PostImgClient {


    @PostMapping("get-post-imgs-id-type")
    ResultObject getPostImgsByIdAndType(
            @RequestParam(name = "id") String id,
            @RequestParam(name = "type") int type) ;

    @PostMapping("delete-post-imgs-post-id-type")
    ResultObject deletePostImgsByPostIdAndType(
            @RequestParam(name = "postId") String postId,
            @RequestParam(name = "type") int type) ;

    @PostMapping("insert-post-img")
    ResultObject insertPostImg (
            @RequestBody PostImg postImg) ;

    @PostMapping("insert-post-imgs")
    ResultObject insertPostImgs (
            @RequestBody List<PostImg> postImgs) ;

    @PostMapping("update-post-img")
    ResultObject updatePostImg(
            @RequestBody PostImg postImg) ;

}
